package cn.edu.wynu.order;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(2)
public class StudentAspect1 {

    @Pointcut("execution(public void cn.edu.wynu.order.Student.badminton())")
    void pointCutBadminton() {}

    @Before("pointCutBadminton()")
    void beforeBadminton() {
        System.out.println("穿羽毛球鞋");
    }

    @After("pointCutBadminton()")
    void afterBadminton() {
        System.out.println("洗个澡");
    }
}
